package zouran.login.emailUtil;

/**
 * @author zouran
 * createDate：2023/5/13  10:34
 */
public class EmailConfig {
    public static final String USER = "*****@163.com"; // 发件人称号，同邮箱地址※
    public static final String PASSWORD = "*********"; // 授权码，开启SMTP时显示※
    public static final String NETEASE_HOST="smtp.163.com"; //邮箱归属地 --网易
    public static final String QQ_HOST="smtp.qq.com"; //邮箱归属地 --qq
    public static final String EMAIl_TITLE="登录验证"; //邮箱标题
    public static String getHost(){
        String host = "";
        try {
            host=USER.split("@")[1].split("\\.")[0];
        }catch (Exception e){
            System.out.println("邮箱格式错误!");
        }
        switch (host){
            case "163":return NETEASE_HOST;
            case "qq":return QQ_HOST;
            default:return null;
        }
    }
}
